package com.um.utils;

public enum ResultEnum {
    //这里是可以自己定义的，方便与前端交互即可
    UNKNOWN_ERROR(-1,"未知错误"),
    SUCCESS(10000,"成功"),
    EMAIL_SEND_ERROR(101,"邮件发送失败"),
    CODE_OVERDUE_ERROR(102,"验证码已过期"),
    CODE_INFO_ERROR(103,"验证码或邮箱不存在"),
    USER_IS_ERROR(201,"用户名已存在"),
    EMAIL_IS_ERROR(202,"邮箱已存在"),
    USER_LOGIN_ERROR(203,"用户邮箱/密码错误")
    ;
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
